package com.hundsun.invocation;

import com.hundsun.model.interfaces.ConfigInfo;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * @author jiangwj20966 2018/9/21
 */
public class ConfigCreatingInvocationHandler implements InvocationHandler {

    private ConfigInfo configInfo;

    public ConfigCreatingInvocationHandler(ConfigInfo configInfo) {
        this.configInfo = configInfo;
    }

    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        return method.invoke(configInfo, args);
    }
}
